//
//  FaceManager.m
//  TestAispeech
//
//  Created by shaowei on 13-9-7.
//  Copyright (c) 2013年 LianZhan. All rights reserved.
//

#import "FaceManager.h"

@implementation FaceManager

+ (BOOL)isHavePersonInfo{
    NSString *person_id = [[NSUserDefaults standardUserDefaults] stringForKey:@"person_id"];
    return person_id != nil;
}

+ (PersonModel *)getPersonInfo{
    PersonModel *model = [[[PersonModel alloc] init] autorelease];
    model.person_id = [[NSUserDefaults standardUserDefaults] stringForKey:@"person_id"];
    model.person_name = [[NSUserDefaults standardUserDefaults] stringForKey:@"person_name"];
    return model;
}

+ (BOOL)savePersonInfo:(PersonModel *)model{
    if (model) {
        [[NSUserDefaults standardUserDefaults] setObject:model.person_id forKey:@"person_id"];
        [[NSUserDefaults standardUserDefaults] setObject:model.person_name forKey:@"person_name"];
        [[NSUserDefaults standardUserDefaults] synchronize];
        return YES;
    }else{
        return NO;
    }
    
}

@end
